<?php

use common\service\StaticService;
use common\service\GlobalUrlService;
use backend\assets\AdminAsset;

$this->title = '管理员登录';

StaticService::includeAppCssStatic(GlobalUrlService::buildStaticUrl('/css/public.css'),AdminAsset::class);
StaticService::includeAppJsStatic(GlobalUrlService::buildStaticUrl('/backend/admin/login.js'),AdminAsset::class);

?>
<form class="layui-form" id="form1">
    <div class="login_face"><img src="<?= GlobalUrlService::buildStaticUrl('img/logo.png')?>" class="userAvatar"></div>
    <div class="layui-form-item input-item">
        <label for="userName">用户名</label>
        <input type="text" placeholder="请输入用户名" autocomplete="off" name="username" id="userName" class="layui-input" lay-verify="required">
    </div>
    <div class="layui-form-item input-item">
        <label for="password">密码</label>
        <input type="password" placeholder="请输入密码" autocomplete="off" name="pass" id="password" class="layui-input" lay-verify="required">
    </div>
    <div class="layui-form-item input-item" id="imgCode">
        <label for="code">验证码</label>
        <input type="text" placeholder="请输入验证码" autocomplete="off" id="code" name="code" class="layui-input">
        <img src="<?=GlobalUrlService::buildAdminUrl('index/get-captcha')?>" onclick="this.src='<?= GlobalUrlService::buildAdminUrl("index/get-captcha")."?"?>'+Math.random();" >
    </div>
    <div class="layui-form-item">
        <button class="layui-btn layui-block" lay-filter="login" lay-submit>登录</button>
    </div>
</form>